<?LassoScript 


	//.................................................................................//
	// 	set default content type encoding
	content_type('text/html; charset=ISO-8859-1');
	
	//	Lasso_ErrorReporting: 'full';
	//	namespace_unload:'er_';
	// 	unloading of custom tags for any odd reason

	
	// 	sitewide global map
	// 	erGlobals is designed to create gloabl map so we can track how many tags have loaded
	!global_defined('erGlobals') ? global('erGlobals' = map('tagfiles'=0));
	
	
	// edit this global var to move eR down the directory tree. It is set to root by default.
	var('er_dir' = '/');
	
	// 	This loads LOCAL settings, usually for server name, etc.
	//	Local settings is design to be used for local testing in a DEV environment, 
	//	once deployment is necessary this will need to be changed 
	//	on the server to the proper values
	include($er_dir + '/_config/lib/localizedsettings.inc');
	

	//.................................................................................//
	// 	load custom tags (runs once per startup)
	// 	use /index.lasso?erRefreshtags=true to reload tags
	include($er_dir + '/_config/lib/tagloader.inc');
	
	// 	load golobal settings
	//	this is to provide a base set of variables the application needs
	library($er_dir + '/_config/lib/globals.inc');
	
	// 	set default title/meta
	// 	we protect again any syntax or text errors for safety
	protect;
		include($er_dir + '/_config/lib/base_metaTags.lasso');
	/protect;
	
	//	master value lists for states, dates, etc..
	library($er_dir + '/_config/lib/master_list.inc');

	// 	session vars
	include($er_dir + '/_config/lib/session.inc');
	
	
	//.................................................................................//
	// 	process content
	$layout = @Include($er_dir + '/controller.inc');
	
	// 	find templates
	library($er_dir + '/_config/lib/templates.lasso');
	$templates->reverse;
	

	// main processing happening here
	//.................................................................................//	
	// 	load templates routine
	// 	it uses an inside out approach
	// 	ultimately you can nested templates to build your page
	// 	current we have it set to only include the last known 
	//	template name set in the useLayout var
	//iterate($templates, var('f'));
		$pageOut = @Include($templates->last);
	///iterate;
	
	// this is where the magic happens and we have a page.
	$pageOut;
	

?>